package org.xhnews.to;

public class Contact {

	private String id;
	private String name;
	private String type;
	private String groupId;
	private boolean checked = false;

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getType() {
		return type;
	}

	public void setGroupId(String groudId) {
		this.groupId = groudId;
	}

	public String getGroupId() {
		return groupId;
	}

	public String toString() {
		return id + " " + name + " " + type + " " + groupId;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public boolean isChecked() {
		return checked;
	}

	public int compareTo(Contact another) {
		return this.id.compareTo(another.id);
	}

	public boolean equals(Contact another) {
		if (this.id.compareTo(another.id) == 0) {
			return true;
		} else {
			return false;
		}
	}
}
